package highlighter.ast.impl;

import highlighter.ast.IASTNode;
import highlighter.visitor.IASTVisitor;

public class Method extends Statement {

	private Modifier modif;
	private VarType varType;
	private Identifier id;
	private boolean isStatic;
	private boolean isFinal;
	private Body body;
	private ParamList params;

	public Method(Modifier modif, VarType varType, Identifier id,
			boolean isStatic, boolean isFinal, Body b, ParamList p) {
		this.modif = modif;
		this.varType = varType;
		this.id = id;
		this.isStatic = isStatic;
		this.isFinal = isFinal;
		this.body = b;
		this.params = p;
	}

	public Identifier getId() {
		return id;
	}

	public VarType getVarType() {
		return this.varType;
	}

	public Modifier getModifier() {
		return this.modif;
	}

	public boolean getIsStatic() {
		return this.isStatic;
	}

	public boolean getIsFinal() {
		return this.isFinal;
	}

	public Body getBody() {
		return this.body;
	}
	
	public ParamList getParams() {
		return this.params;
	}

	@Override
	public Object accept(IASTVisitor visitor) {
		return visitor.visit(this);
	}
}
